#ifndef NEOTOGGLEBUTTON_H
#define NEOTOGGLEBUTTON_H

#include "def.h"
#include <QWidget>

class NeoToggleButtonPrivate;
class NeoToggleButton : public QWidget
{
    Q_OBJECT
    NEO_PUBLIC_CREATE(NeoToggleButton)
    NEO_PUBLIC_PROPERTY_CREATE_NOTIFY_H(bool, Checked)
    NEO_PUBLIC_PROPERTY_CREATE_NOTIFY_H(NeoIconType::FontAwesomeSolid, Icon)
    NEO_PUBLIC_PROPERTY_CREATE_NOTIFY_H(QString, Text)
    NEO_PUBLIC_PROPERTY_CREATE_H(bool, IsAnimationEnabled)
    NEO_PUBLIC_PROPERTY_CREATE_H(QColor, NormalBackgroundColor)
    NEO_PUBLIC_PROPERTY_CREATE_H(QColor, CheckedBackgroundColor)
    NEO_PUBLIC_PROPERTY_CREATE_H(QColor, NormalForegroundColor)
    NEO_PUBLIC_PROPERTY_CREATE_H(QColor, CheckedForegroundColor)
public:
    NeoToggleButton(QWidget *parent = nullptr);
    NeoToggleButton(const QString &text, QWidget *parent = nullptr);
    NeoToggleButton(NeoIconType::FontAwesomeSolid icon, QWidget *parent = nullptr);
    ~NeoToggleButton();

protected:
    void mousePressEvent(QMouseEvent *event) override;
    void mouseReleaseEvent(QMouseEvent *event) override;
    void paintEvent(QPaintEvent *event) override;
};

#endif